package zq.cn.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

import zq.cn.utils.BtnTools;

public class SearchActivity extends BtnTools {
    private Button btn;
    private EditText et;
    private TextView tv;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.pager_search);

        tv = (TextView) findViewById(R.id.top_text);
        tv.setText("搜索问题");
        super.init(2);

        btn = (Button) findViewById(R.id.search_btn);
        et = (EditText) findViewById(R.id.et);

        btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent in = new Intent(SearchActivity.this,ViewInfoActivity.class);
                in.putExtra("keyword",et.getText().toString());
                startActivity(in);
            }
        });
    }
}
